package com.erp.erp_entitys.Customer;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 * 客户信息
 */
public class CustomerEntity implements Serializable {
    /**
     * 主键id
     */
    private Integer id;

    /**
     * 简称
     */
    private String abbreviation;
    /**
     * 客户简码
     */
    private String shortCode;

    /**
     * 业务员
     */
    private String salesman;

    /**
     * 客户编码
     */
    private String code;

    /**
     * 客户名称
     */
    private String name;

    /**
     * 客户类型
     */
    private String type;

    /**
     * 地址
     */
    private String address;

    /**
     * 国家/地区
     */
    private String country;

    /**
     * 省份/港口
     */
    private String province;

    /**
     * 城市
     */
    private String city;

    /**
     * 邮编
     */
    private String postcode;

    /**
     * 主页
     */
    private String homepage;

    /**
     * SWIFT CODE
     */
    private String swiftcode;

    /**
     * 跟进周期(天)
     */
    private Integer followUpPeriod;

    /**
     * 快寄地址
     */
    private String expressAddress;

    /**
     * 快寄到付账号
     */
    private String paymentAccountNo;

    /**
     * 客户级别
     */
    private String level;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建者
     */
    private String creater;

    /**
     * 创建时间
     */
    private Date createtime;

    /**
     * 帐期
     */
    private String accountPeriod;

    /**
     * 开户银行
     */
    private String bank;

    /**
     * 开户帐号
     */
    private String bankaccount;

    /**
     * 主营产品
     */
    private String mainBusiness;

    /**
     * 客户来源
     */
    private String sourceOfCustomers;

    /**
     * 业务类型
     */
    private String businessType;

    /**
     * 电话
     */
    private String phone;

    /**
     * 审批状态
     */
    private String spstatus;

    /**
     * 客户状态
     */
    private String status;

    /**
     * logo
     */
    private String logo;

    /**
     * 创建者
     */
    private String updater;

    /**
     * 创建时间
     */
    private Date updatetime;

    /**
     * 信用额度
     */
    private String creditLine;

    /**
     * 成单日期
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date orderDate;


    /**
     * 邮件字符串
     */
    private String emailStr;

    /**
     * 是否授信（0:否，1是）
     */
    private String isCredit;

    /**
     * 客户 属性
     */
    private String attributesOfCustomers;

    /**
     * 用作查询共享客户条件参数，不参与存储
     * 查询客户时需要查询出当前登录人的合作客户
     */
    private String customerShareUserCode;
    /**
     * 是否成单（是否做过外销）
     * 不参与存储
     * 查询客户时需要查询出客户是否做过外销
     */
    private String isMaker;

    public String getIsMaker() {
        return isMaker;
    }

    public void setIsMaker(String isMaker) {
        this.isMaker = isMaker;
    }

    public String getCustomerShareUserCode() {
        return customerShareUserCode;
    }

    public void setCustomerShareUserCode(String customerShareUserCode) {
        this.customerShareUserCode = customerShareUserCode;
    }

    public String getAttributesOfCustomers() {
        return attributesOfCustomers;
    }

    public void setAttributesOfCustomers(String attributesOfCustomers) {
        this.attributesOfCustomers = attributesOfCustomers;
    }

    public String getIsCredit() {
        return isCredit;
    }

    public void setIsCredit(String isCredit) {
        this.isCredit = isCredit;
    }

    public String getEmailStr() {
        return emailStr;
    }

    public void setEmailStr(String emailStr) {
        this.emailStr = emailStr;
    }

    public String getShortCode() {
        return shortCode;
    }

    public void setShortCode(String shortCode) {
        this.shortCode = shortCode;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public String getCreditLine() {
        return creditLine;
    }

    public void setCreditLine(String creditLine) {
        this.creditLine = creditLine;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAbbreviation() {
        return abbreviation;
    }

    public void setAbbreviation(String abbreviation) {
        this.abbreviation = abbreviation;
    }

    public String getSalesman() {
        return salesman;
    }

    public void setSalesman(String salesman) {
        this.salesman = salesman;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    public String getHomepage() {
        return homepage;
    }

    public void setHomepage(String homepage) {
        this.homepage = homepage;
    }

    public String getSwiftcode() {
        return swiftcode;
    }

    public void setSwiftcode(String swiftcode) {
        this.swiftcode = swiftcode;
    }

    public Integer getFollowUpPeriod() {
        return followUpPeriod;
    }

    public void setFollowUpPeriod(Integer followUpPeriod) {
        this.followUpPeriod = followUpPeriod;
    }

    public String getExpressAddress() {
        return expressAddress;
    }

    public void setExpressAddress(String expressAddress) {
        this.expressAddress = expressAddress;
    }

    public String getPaymentAccountNo() {
        return paymentAccountNo;
    }

    public void setPaymentAccountNo(String paymentAccountNo) {
        this.paymentAccountNo = paymentAccountNo;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getAccountPeriod() {
        return accountPeriod;
    }

    public void setAccountPeriod(String accountPeriod) {
        this.accountPeriod = accountPeriod;
    }

    public String getBank() {
        return bank;
    }

    public void setBank(String bank) {
        this.bank = bank;
    }

    public String getBankaccount() {
        return bankaccount;
    }

    public void setBankaccount(String bankaccount) {
        this.bankaccount = bankaccount;
    }

    public String getMainBusiness() {
        return mainBusiness;
    }

    public void setMainBusiness(String mainBusiness) {
        this.mainBusiness = mainBusiness;
    }

    public String getSourceOfCustomers() {
        return sourceOfCustomers;
    }

    public void setSourceOfCustomers(String sourceOfCustomers) {
        this.sourceOfCustomers = sourceOfCustomers;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSpstatus() {
        return spstatus;
    }

    public void setSpstatus(String spstatus) {
        this.spstatus = spstatus;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CustomerEntity other = (CustomerEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAbbreviation() == null ? other.getAbbreviation() == null : this.getAbbreviation().equals(other.getAbbreviation()))
            && (this.getSalesman() == null ? other.getSalesman() == null : this.getSalesman().equals(other.getSalesman()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getCountry() == null ? other.getCountry() == null : this.getCountry().equals(other.getCountry()))
            && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getPostcode() == null ? other.getPostcode() == null : this.getPostcode().equals(other.getPostcode()))
            && (this.getHomepage() == null ? other.getHomepage() == null : this.getHomepage().equals(other.getHomepage()))
            && (this.getSwiftcode() == null ? other.getSwiftcode() == null : this.getSwiftcode().equals(other.getSwiftcode()))
            && (this.getFollowUpPeriod() == null ? other.getFollowUpPeriod() == null : this.getFollowUpPeriod().equals(other.getFollowUpPeriod()))
            && (this.getExpressAddress() == null ? other.getExpressAddress() == null : this.getExpressAddress().equals(other.getExpressAddress()))
            && (this.getPaymentAccountNo() == null ? other.getPaymentAccountNo() == null : this.getPaymentAccountNo().equals(other.getPaymentAccountNo()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreater() == null ? other.getCreater() == null : this.getCreater().equals(other.getCreater()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getAccountPeriod() == null ? other.getAccountPeriod() == null : this.getAccountPeriod().equals(other.getAccountPeriod()))
            && (this.getBank() == null ? other.getBank() == null : this.getBank().equals(other.getBank()))
            && (this.getBankaccount() == null ? other.getBankaccount() == null : this.getBankaccount().equals(other.getBankaccount()))
            && (this.getMainBusiness() == null ? other.getMainBusiness() == null : this.getMainBusiness().equals(other.getMainBusiness()))
            && (this.getSourceOfCustomers() == null ? other.getSourceOfCustomers() == null : this.getSourceOfCustomers().equals(other.getSourceOfCustomers()))
            && (this.getBusinessType() == null ? other.getBusinessType() == null : this.getBusinessType().equals(other.getBusinessType()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getSpstatus() == null ? other.getSpstatus() == null : this.getSpstatus().equals(other.getSpstatus()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getLogo() == null ? other.getLogo() == null : this.getLogo().equals(other.getLogo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAbbreviation() == null) ? 0 : getAbbreviation().hashCode());
        result = prime * result + ((getSalesman() == null) ? 0 : getSalesman().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getCountry() == null) ? 0 : getCountry().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getPostcode() == null) ? 0 : getPostcode().hashCode());
        result = prime * result + ((getHomepage() == null) ? 0 : getHomepage().hashCode());
        result = prime * result + ((getSwiftcode() == null) ? 0 : getSwiftcode().hashCode());
        result = prime * result + ((getFollowUpPeriod() == null) ? 0 : getFollowUpPeriod().hashCode());
        result = prime * result + ((getExpressAddress() == null) ? 0 : getExpressAddress().hashCode());
        result = prime * result + ((getPaymentAccountNo() == null) ? 0 : getPaymentAccountNo().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreater() == null) ? 0 : getCreater().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getAccountPeriod() == null) ? 0 : getAccountPeriod().hashCode());
        result = prime * result + ((getBank() == null) ? 0 : getBank().hashCode());
        result = prime * result + ((getBankaccount() == null) ? 0 : getBankaccount().hashCode());
        result = prime * result + ((getMainBusiness() == null) ? 0 : getMainBusiness().hashCode());
        result = prime * result + ((getSourceOfCustomers() == null) ? 0 : getSourceOfCustomers().hashCode());
        result = prime * result + ((getBusinessType() == null) ? 0 : getBusinessType().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getSpstatus() == null) ? 0 : getSpstatus().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getLogo() == null) ? 0 : getLogo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", abbreviation=").append(abbreviation);
        sb.append(", salesman=").append(salesman);
        sb.append(", code=").append(code);
        sb.append(", name=").append(name);
        sb.append(", type=").append(type);
        sb.append(", address=").append(address);
        sb.append(", country=").append(country);
        sb.append(", province=").append(province);
        sb.append(", city=").append(city);
        sb.append(", postcode=").append(postcode);
        sb.append(", homepage=").append(homepage);
        sb.append(", swiftcode=").append(swiftcode);
        sb.append(", followUpPeriod=").append(followUpPeriod);
        sb.append(", expressAddress=").append(expressAddress);
        sb.append(", paymentAccountNo=").append(paymentAccountNo);
        sb.append(", level=").append(level);
        sb.append(", remark=").append(remark);
        sb.append(", creater=").append(creater);
        sb.append(", createtime=").append(createtime);
        sb.append(", accountPeriod=").append(accountPeriod);
        sb.append(", bank=").append(bank);
        sb.append(", bankaccount=").append(bankaccount);
        sb.append(", mainBusiness=").append(mainBusiness);
        sb.append(", sourceOfCustomers=").append(sourceOfCustomers);
        sb.append(", businessType=").append(businessType);
        sb.append(", phone=").append(phone);
        sb.append(", spstatus=").append(spstatus);
        sb.append(", status=").append(status);
        sb.append(", logo=").append(logo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}